@import '@devui/theme/styles-var/devui-var.scss';

$devui-transfer-header-height: 40px;
$devui-transfer-body-list-item-height: 32px;

.#{$devui-prefix}-transfer {
  display: flex;

  &__panel {
    width: 300px;
    border: 1px solid $devui-line;
    border-radius: $devui-border-radius;

    &--header {
      display: flex;
      justify-content: space-between;
      height: $devui-transfer-header-height;
      line-height: $devui-transfer-header-height;
      border-bottom: 1px solid $devui-dividing-line;
      padding: 0 16px;

      &-allChecked {
        display: flex;
      }

      &-num {
        color: $devui-aide-text;

        &-unit {
          margin-left: 4px;
        }
      }
    }

    &--body {
      display: flex;
      flex-direction: column;
      height: 100%;

      &-search {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 7px 16px 0 16px;

        .#{$devui-prefix}-search {
          width: 100%;
        }

        .#{$devui-prefix}-input__inner {
          padding: 5px 0;
        }
      }

      &-list {
        overflow: auto;
        padding-top: 8px;
        width: 100%;

        &-group > div > div {
          padding: 0 16px;
          cursor: pointer;
        }

        &-item {
          display: flex;
          align-items: center;
          border-top: 2px solid transparent;
          border-bottom: 2px solid transparent;
          padding: 4px 0;
          cursor: pointer;
          height: 36px;
          line-height: 36px;
          font-size: $devui-font-size;

          .icon-drag-small {
            cursor: move;
            padding: 0 1px;
            visibility: hidden;
          }

          &:hover .icon-drag-small {
            visibility: visible;
          }
        }

        &-drag {
          &-dragging {
            background-color: $devui-brand-foil !important;
          }

          &-over {
            background-color: $devui-brand-hover;
          }

          &-over-top {
            border-top-color: $devui-brand-active;
          }

          &-over-bottom {
            border-bottom-color: $devui-brand-active;
          }
        }

        &-drag:hover .#{$devui-prefix}-transfer__panel-body-list-drag__icon {
          visibility: visible;
        }

        &-tooltip {
          .slotElement {
            display: flex;
          }
        }

        &-empty {
          height: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          color: $devui-disabled-text;
        }
      }

      &-nodrag {
        padding: 0 20px;
      }
    }
  }

  &__operate {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 12px;

    &--group {
      display: flex;
      flex-direction: column;

      .#{$devui-prefix}-button__icon.#{$devui-prefix}-button--circle.#{$devui-prefix}-button--lg {
        width: 36px;
        height: 36px;
      }

      &-right {
        margin-top: 20px;
      }
    }
  }

  &-drag-dragging {
    background-color: $devui-brand-foil;
  }

  .transfer-checkbox {
    height: 36px;
    line-height: 36px;
    font-size: $devui-font-size;
  }
}
.#{$devui-prefix}-transfer–drag-over-top {
  border-top-color: $devui-brand-active;
}

.#{$devui-prefix}-transfer–drag-over-bottom {
  border-bottom-color: $devui-brand-active;
}

.transfer-checkbox .#{$devui-prefix}-checkbox label {
  display: flex;
  width: 100% !important;
}

.transfer-checkbox .#{$devui-prefix}-checkbox label .#{$devui-prefix}-checkbox__material {
  flex-shrink: 0;
}
